<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %> <!-- 注意这种方式引入Struts2标签 -->

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>我的Struts2Demo测试</title>

  </head>
  
  <body>
	
  	<form action="<%=basePath%>mylogin!login.action" method="post">
  		<table cellpadding="5px" cellspacing="0px">
  			<tr>
  				<td align="right">用户名:</td>
  				<td><input type="text" name="user.username" id="user.username"><br/></td>
  			</tr>
  			<tr>
  				<td align="right">密&nbsp;&nbsp;&nbsp;码:</td>
  				<td><input type="password" name="user.password" id="user.password"></td>
  			</tr>
  			<tr>
  				<td colspan="2"><input type="submit" value="提交"/>&nbsp;&nbsp;<input type="reset" value="重置"/> </td>
  			</tr>
  		</table>
  		
  	</form>
  </body>
</html>
